<?php
namespace app\common\controller;
use think\auth\Auth;
use think\Loader;
use think\Controller;

class HelpBaseController extends Controller {
	
	    protected function _initialize() {
        parent::_initialize();
            $this->getMenu();
            $this->assign('current_url', Loader::parseName(request()->controller().'/'.request()->action()));
		// 配置
	
    }
     public  function getMenu() {
        $menu     = [];
       
        $auth     = new Auth();
        $auth_rule_list = db('mall_helptype')->order("sort desc")->select();
        foreach ($auth_rule_list as $value) {
            
                $menu[] = $value;
            
        }
        $menu = !empty($menu) ? array2tree($menu) : [];
        $this->assign('menu', $menu);
    }
	
	
	
	
	
}



?>